package com.example.javapracticaltraining.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName fee_info
 */
@TableName(value ="fee_info")
@Data
public class FeeInfo {
    /**
     * 
     */
    @TableId(value = "fee_id", type = IdType.AUTO)
    private Integer feeId;

    /**
     * 
     */
    @TableField(value = "elderly_id")
    private Integer elderlyId;

    /**
     * 
     */
    @TableField(value = "fee_type")
    private String feeType;

    /**
     * 
     */
    @TableField(value = "amount")
    private BigDecimal amount;

    /**
     * 
     */
    @TableField(value = "period")
    private String period;

    /**
     * 已支付为1，未支付为0
     */
    @TableField(value = "pay_status")
    private String payStatus;

    /**
     * 
     */
    @TableField(value = "pay_time")
    private Date payTime;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FeeInfo other = (FeeInfo) that;
        return (this.getFeeId() == null ? other.getFeeId() == null : this.getFeeId().equals(other.getFeeId()))
            && (this.getElderlyId() == null ? other.getElderlyId() == null : this.getElderlyId().equals(other.getElderlyId()))
            && (this.getFeeType() == null ? other.getFeeType() == null : this.getFeeType().equals(other.getFeeType()))
            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
            && (this.getPeriod() == null ? other.getPeriod() == null : this.getPeriod().equals(other.getPeriod()))
            && (this.getPayStatus() == null ? other.getPayStatus() == null : this.getPayStatus().equals(other.getPayStatus()))
            && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFeeId() == null) ? 0 : getFeeId().hashCode());
        result = prime * result + ((getElderlyId() == null) ? 0 : getElderlyId().hashCode());
        result = prime * result + ((getFeeType() == null) ? 0 : getFeeType().hashCode());
        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
        result = prime * result + ((getPeriod() == null) ? 0 : getPeriod().hashCode());
        result = prime * result + ((getPayStatus() == null) ? 0 : getPayStatus().hashCode());
        result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", feeId=").append(feeId);
        sb.append(", elderlyId=").append(elderlyId);
        sb.append(", feeType=").append(feeType);
        sb.append(", amount=").append(amount);
        sb.append(", period=").append(period);
        sb.append(", payStatus=").append(payStatus);
        sb.append(", payTime=").append(payTime);
        sb.append("]");
        return sb.toString();
    }
}